<form role="form" action="" class="frm-operate" method="post">
    <div class="card shadow-none">
        <div class="card-body">
            <div class="form-group row">
                <label for="frm-title" class="col-sm-2 row-form-label"><span class="text-danger">*</span> {:lang("Title")}</label>
                <div class="col-sm-8">
                    <input type="text" id="frm-title" class="form-control" name="row[title]" data-rule="required" value="{$row->title}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-mark" class="col-sm-2 row-form-label"><span class="text-danger">*</span> {:lang("Mark")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-mark" name="row[mark]" data-rule="required" placeholder="" value="{$row->mark}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-subtitle" class="col-sm-2 row-form-label">{:lang("Subtitle")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-subtitle" name="row[subtitle]" value="{$row->subtitle}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-image" class="col-sm-2 row-form-label">{:lang("Image")}</label>
                <div class="col-sm-8 fileGroup">
                    <div class="file-btn">
                        <input type="text" class="form-control txt-files" id="frm-image" name="row[image]" value="{$row->image}">
                        <button type="button"
                                class="btn btn-default btn-imgUpload"
                                data-mimetype="image/*"
                                data-multiple="false"
                                data-field="frm-image"><i class="fas fa-upload"></i> {:lang('Upload')}</button>
                        <button type="button"
                                class="btn btn-default btn-imgSelect"
                                data-mimetype="image/*"
                                data-multiple="false"
                                data-field="frm-image"><i class="fas fa-images"></i> {:lang('Select')}</button>
                    </div>
                    <div class="file-preview row mt-2"></div>
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-icon" class="col-sm-2 row-form-label">{:lang("icon")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-icon" name="row[icon]" value="{$row->icon}">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-weigh" class="col-sm-2 row-form-label">{:lang("weigh")}</label>
                <div class="col-sm-8">
                    <input type="number" class="form-control" id="frm-weigh" name="row[weigh]" value="{$row->weigh}">
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("New window")}</label>
                <div class="col-sm-8">
                    {:build_radios('row[target]',['1'=>lang("Yes"),'0'=>lang("No")], $row->target)}
                </div>
            </div>
            <input type="hidden" value="{$row->module}" name="row[module]">
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("Status")}</label>
                <div class="col-sm-8">
                    {:build_radios('row[status]',['1'=>lang("Normal"),'0'=>lang("Hidden")], $row->status)}
                </div>
            </div>
        </div>
        <div class="card-footer">
            <div class="row justify-content-around">
                <div class="col-sm-8">
                    <button type="submit" class="btn btn-primary btn-submit">{:lang('Submit')}</button>
                    <button type="reset" class="btn btn-default">{:lang('Reset')}</button>
                </div>
            </div>
        </div>
    </div>
</form>

{block:script}
<script>
    require(['admin','form'], function (admin,Form) {
        Form.api.init();
    })
</script>
{/block:script}
